/** When your routing table is too long, you can split it into small modules**/

import Layout from '@/layout/index.vue'

const proInfoRouter = [
  {
    path: '/proInfo',
    component: Layout,
    redirect: '/proInfo',
    name: 'proInfo',
    meta: {
      title: '项目管理',
      icon: 'Promotion',
      roles: ['ROLE_MANAGER'],
    },
    children: [
      {
        path: 'project',
        component: () => import('@/views/project/project/index.vue'),
        name: 'project',
        meta: { title: '项目增改', keepAlive: true, icon: 'MenuIcon', roles: ['ROLE_MANAGER'] },
      },
      {
        path: 'projectsCards',
        component: () => import('@/views/project/projectCard/index.vue'),
        name: 'projectsCards',
        meta: { title: '项目信息', keepAlive: true, icon: 'ChatLineSquare', roles: ['ROLE_ADMIN'] },
      },
      {
        path: 'info',
        component: () => import('@/views/project/projectHome/index.vue'),
        name: 'projectsInfo',
        hidden: true,
        meta: { title: '项目详情', icon: 'MenuIcon', roles: ['ROLE_ADMIN'] },
      },
      {
        path: 'statistics',
        component: () => import('@/views/project/statistics/index.vue'),
        name: 'statistics',
        meta: {
          title: '项目统计',
          keepAlive: true,
          svg: 'statistics-menu',
          activePath: '/proInfo/statistics',
          roles: ['ROLE_ADMIN'],
        },
      },
      {
        path: 'allTicket',
        component: () => import('@/views/project/allTicket/index.vue'),
        name: 'allTicket',
        meta: {
          title: '发票统计',
          keepAlive: true,
          svg: 'statistics-menu',
          activePath: '/proInfo/allTicket',
          roles: ['ROLE_ADMIN'],
        },
      },
      {
        path: 'moneySituation',
        component: () => import('@/views/project/moneySituation/index.vue'),
        name: 'moneySituation',
        meta: {
          title: '收付款统计',
          keepAlive: true,
          svg: 'statistics-menu',
          activePath: '/proInfo/moneySituation',
          roles: ['ROLE_ADMIN'],
        },
      },
    ],
  },
]

export default proInfoRouter
